package com.example.httpclient;

public class HttpGetTest {
    public static void main(String[] args) {
        /*
        String url = "https://www.baidu.com";
        String content = MyHttpClientUtils.get(url);
        String doGetAndParamContent = MyHttpClientUtils.doGetAndParam(url, "花千骨");
        System.out.println(doGetAndParamContent);
        String postResult = MyHttpClientUtils.post(url);
        Map<String,String> map = new HashMap<>();
        map.put("userName", "admin");
        map.put("password", "123456");
        String doPostAndParam = MyHttpClientUtils.doPostAndParam(url, map);
         */
        /*
        Map<String, Object> map = new HashMap<>();
        map.put("sweepDate", "06");
        String sweepDate = (String) map.get("sweepDate");
        String temp = null;
        switch (sweepDate){
            case "01":
                temp = "周日";
                break;
            case "02":
                temp = "周一";
                break;
            case "03":
                temp = "周二";
                break;
            case "04":
                temp = "周三";
                break;
            case "05":
                temp = "周四";
                break;
            case "06":
                temp = "周五";
                break;
            case "07":
                temp = "周六";
                break;
        }
        map.remove("sweepDate");
        map.put("sweepDate", temp);
        System.out.println(map);
        MsgHeader msgHeader = new MsgHeader();
        msgHeader.setToken("token");
        msgHeader.setIp("ip");
        msgHeader.setUserId("userId");
        MsgBody msgBody = new MsgBody();
        msgBody.setPassword("password");
        msgBody.setUserName("userName");

        msgBody.setDcflag("dcflag");

        DocumentData document = new DocumentData(msgHeader, msgBody);
        Map<String, Object> map = new HashMap<>();
        map.put("key1", "values1");
        msgBody.setMap(map);
        Map<String, Object> res = new HashMap<>();
        res.put("document", document);
        System.out.println(JSONObject.toJSON(res));
         */
    }
}
